package cn.tedu.micro.device.controller;

import cn.tedu.micro.common.protocol.JsonResult;
import cn.tedu.micro.common.vo.GunIngoVO;
import cn.tedu.micro.device.service.DeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DeviceController {
    @Autowired
    private DeviceService deviceService;
    @GetMapping("/device/gun/info/{gunId}")
    public JsonResult<GunIngoVO> checkGunStatus(@PathVariable(name="gunId")Integer id){
        GunIngoVO vo = deviceService.checkGunStatus(id);
        return JsonResult.success(vo);
    }
}
